﻿Imports AdvanceWars.Data

<Serializable()>
Public Class Weapon
    ''' <summary>
    ''' 武器种类
    ''' </summary>
    Public ReadOnly Type As WeaponType

    ''' <summary>
    ''' 武器弹药
    ''' </summary>
    Property Ammo As PairValue

    ''' <summary>
    ''' 武器范围
    ''' </summary>
    Property Range As Range

    Sub New(ByVal id As Integer)
        Me.New(DataService.WeaponFactory(id))
    End Sub

    Sub New(ByVal Type As WeaponType)
        Me.Type = Type
        Me.Ammo = New PairValue(Type.MaxAmmo)
        Me.Range = Type.Range
    End Sub
End Class
